<%# if logged_in? -%>
<%  
# this partial renders a tabnav, you can call it in your views with:
#   <%= tabnav :main % > (just the tabnav) 
# or, if you want a boxed tabnav:
#   <% tabnav :main do % >
#     your html here
#   <% end % >
# (remove the space between % and >, we don't want to mess up your brand new tabnav :-))
#
# you can pass render_tabnav a few options:
#   :generate_css => true|false #=> generates a default inline css for the tabnav, defaults to false
#   :html => aHash #=> sets html options for the tabnav's div (es :html => {:class=> 'myCssClass', :id=>'myCssId'}) 
#     
render_tabnav :main, 
              :generate_css => false do 
    
  # this generates a tab for every controller in your app
  # you'll probably want to delete this and
  # add tabs one by one as shown below
  # controller_names.each do |name|
  #   add_tab do |t|
  #     t.named name.camelize
  #     t.titled "Go to #{name.camelize}"
  #     t.links_to :controller => name
  #   end
  # end 
         
 
	add_tab do |t|
   t.named 'People'
   t.titled "Who's who in the MethodBox"
   t.links_to :controller => 'people'
  end unless !logged_in?


	add_tab do |t|
   t.named 'Methods and Scripts'
   t.titled "Advice and scripts for data cleaning and statistical analysis"
   t.links_to :controller => 'scripts'
  end


  add_tab do |t|
   t.named 'Data Sources'
   t.titled "Archived surveys and other sources of data for research"
   t.links_to :controller => 'surveys'
  end

  add_tab do |t|
   t.named 'Data Extracts'
   t.titled "Data sources created by the users"
   t.links_to :controller => 'csvarchives'
  end #unless !logged_in?

  add_tab do |t|
   t.named 'Publications'
   t.titled "Publications added from PubMed"
   t.links_to :controller => 'publications'
  end unless !logged_in?


  add_tab do |t|
   t.named 'Groups'
   t.titled "Create groups to share things with"
   t.links_to :controller => 'work_groups'
  end unless !logged_in?

  add_tab do |t|
   t.named 'Help'
   t.titled "How to use MethodBox to find variables, share methods and browse surveys"
   t.links_to :controller => 'help'
  end

  add_tab do |t|
   t.named 'Forums'
   t.titled "Ask questions, help others"
   t.links_to :controller => 'forums'
  end unless !logged_in?
if current_user && current_user.is_admin?
  add_tab do |t|
   t.named 'Statistics'
   t.titled "User activity and downloads"
   t.links_to :controller => 'statistics'
  end 
end
  #  
  # you can use restful routes with:
  #
  #add_tab do |t|
  #  t.named 'Users'
  #  t.links_to hash_for_users_path
  #end
  #
  #add_tab do |t|
  #  t.named 'Customers'
  #  t.links_to :controller => 'customers'
  #end
  #  
  # # A tab can be initialized with a Hash like this:
  # 
  # add_tab :name => 'welcome', :link => {:controller=>'welcome'}
  #
  # # You can have a dynamic name or link 
  # # (this partial is evaluated in the page context, so it sees every helper or instance variable)
  #  
  # add_tab do |t|
  #   t.named "#{current_user} details"
  #   t.links_to :controller => 'users', :action => 'show', :id => current_user.id
  # end
  #
  # # You can have an image inside 
  #
  # add_tab do |t|
  #   t.named image_tag('test')
  #   t.links_to :controller => 'users', :action => 'show', :id => current_user.id
  # end
end 
%>
<%# end -%>